﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Users/TemplateUsers.Master" AutoEventWireup="true" CodeBehind="OrdersList.aspx.cs" Inherits="OnlineDigitalCameraWebsite.Users.OrderList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <h2 class="sub-header">
        <asp:Label ID="Label1" runat="server" Text="Danh sách Orders"></asp:Label></h2>
   
            <asp:Label ID="lbThongBao" class="label label-info" runat="server" Text=""></asp:Label>

            <br />
            <asp:GridView ID="gvDS" runat="server" AllowPaging="True" class="table" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" OnPageIndexChanging="gvDS_PageIndexChanging" OnRowCancelingEdit="gvDS_RowCancelingEdit" OnRowEditing="gvDS_RowEditing" OnSelectedIndexChanged="gvDS_SelectedIndexChanged" OnSelectedIndexChanging="gvDS_SelectedIndexChanging" OnRowDeleting="gvDS_RowDeleting" OnRowDataBound="gvDS_RowDataBound">
                <AlternatingRowStyle BackColor="Gainsboro" />
                <Columns>

                    <asp:TemplateField HeaderText="Mã">
                        <EditItemTemplate>
                            <asp:Label ID="id" runat="server" Text='<%# Bind("ordersId") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="id1" runat="server" Text='<%# Bind("ordersId") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên">
                        <EditItemTemplate>
                            <asp:Label ID="Names" runat="server" Text='<%# Bind("Names") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Names1" runat="server" Text='<%# Bind("Names") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày" >
                        <EditItemTemplate>
                            <asp:Label ID="Dates" runat="server" Text='<%# Bind("Dates") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Dates1" runat="server" Text='<%# Bind("Dates") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     
                    <asp:TemplateField HeaderText="Giá">
                        <EditItemTemplate>
                            <asp:Label ID="TotalAmount" runat="server" Text='<%# Bind("TotalAmount") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="TotalAmount1" runat="server" Text='<%# Bind("TotalAmount") %>' Visible="false"></asp:Label>

                            <asp:Label ID="Label1" runat="server" Text='<%#  string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:#,## VNĐ}",Eval("TotalAmount")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                  
                    <asp:TemplateField HeaderText="Tình trạng">
                        <EditItemTemplate>
                            <asp:Label ID="ordersStatus" runat="server" Text='<%# Bind("ordersStatus") %>'></asp:Label>

                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ordersStatus1" runat="server" Text='<%# Eval("ordersStatus") %>' Visible="false"></asp:Label>
                            <asp:Label ID="lblordersStatus" runat="server" Text='<%# Eval("ordersStatus") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Chi tiết">
                        <EditItemTemplate>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink runat="server" Text="Xem" NavigateUrl='<%# "/Users/OrdersList_Detail.aspx?type=capnhat&id=" + Eval("ordersId") %>'></asp:HyperLink>
                        </ItemTemplate>

                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa" ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick=" return confirm('Bạn có chắc chắn muốn xóa không ?');" Text="Xóa"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#0000A9" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#000065" />
            </asp:GridView>
</asp:Content>
